package bbs.controller;

import bbs.controller.base.ABaseController;
import bbs.entity.po.ForumBoard;
import bbs.entity.vo.ResponseVO;
import bbs.service.ForumBoardService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * 板块信息
 */
@RestController("forumBoardController")
@RequestMapping({"/board"})
public class ForumBoardController extends ABaseController {
    @Resource
    private ForumBoardService forumBoardService;

    @RequestMapping({"/loadBoard"})
    public ResponseVO loadBoard() {
        List<ForumBoard> boardTree = this.forumBoardService.getBoardTree(null);
        return getSuccessResponseVO(boardTree);
    }

}
